﻿using SportsPlatform.Dto.SportBusiness.Competition;
using SportsPlatform.Base;
using SportsPlatform.Query.Competition;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services;
using Microsoft.AspNetCore.Mvc;

namespace SportsPlatform.SportBusiness.ISportBusiness
{
    /// <summary>
    /// 赛事相关接口
    /// </summary>
    public interface ICompetitionService : IApplicationService
    {
        /// <summary>
        /// 分页获取赛事列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<PagePagingDto<Clientlog>> GetCompetitionPageList(GetCompetitionPageListQuery query);

        /// <summary>
        /// 新增、修改赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultByIdDto> EditCompetition(EditCompetitionQuery query);

        /// <summary>
        /// 关闭赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<BaseResultDto> CloseCompetition(CompetitionIdQuery query);

        /// <summary>
        /// 发布赛事
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<BaseResultDto> ReleaseCompetition(CompetitionIdQuery query);

        /// <summary>
        /// 根据赛事ID获取赛事详情
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<ResultDto<GetCompetitionDetailsDto>> GetCompetitionDetailsById([FromBody] CompetitionIdQuery query);

        /// <summary>
        /// 获取未关闭的赛事列表
        /// 根据当前用户的公司ID获取用于新增报名时获取未关闭的赛事列表
        /// </summary>
        /// <returns></returns>
        Task<ResultListDto<GetNotClosedCompetitionListDto>> GetNotClosedCompetitionList();

        /// <summary>
        /// 客户端分页获取赛事信息（用于信息同步）
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<PagePagingDto<GetPageCompetitionKHDDto>> GetPageCompetitionKHD(BasePageQuery query);

        /// <summary>
        /// 客户端赛事信息同步
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        Task<BaseResultDto> CompetitionSynchronization(List<CompetitionSynchronizationQuery> query);



    }
}
